<?php

namespace App\Modules\User\Models;

use Illuminate\Foundation\Auth\User;
use Silber\Bouncer\Database\HasRolesAndAbilities;
use Illuminate\Database\Eloquent\SoftDeletes;

class Admin extends User
{
    use SoftDeletes;

    use HasRolesAndAbilities;

    const NORMAL_AUTH = 0;
    const MERCHANT_AUTH = 1;

    public static $authShow = [
        self::NORMAL_AUTH => "正常权限",
        self::MERCHANT_AUTH => "商家职员",
    ];
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'username', 'password', 'avatar', 'is_clerk', 'is_disabled', 'sort',
        'is_merchant_staff',//是否是商家职员
        'shop_id'//商铺id
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}
